//public class MySQL {
//}
//
//Enter password: *********
//Welcome to the MySQL monitor.  Commands end with ; or \g.
//Your MySQL connection id is 8
//Server version: 8.0.39 MySQL Community Server - GPL
//
//Copyright (c) 2000, 2024, Oracle and/or its affiliates.
//
//Oracle is a registered trademark of Oracle Corporation and/or its
//affiliates. Other names may be trademarks of their respective
//owners.
//
//        Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
//
//mysql> show databases;
//+--------------------+
//        | Database           |
//        +--------------------+
//        | bit_mall           |
//        | homework           |
//        | information_schema |
//        | java113            |
//        | mysql              |
//        | performance_schema |
//        | sys                |
//        | test               |
//        | test2              |
//        +--------------------+
//        9 rows in set (0.01 sec)
//
//mysql> usetest;
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'usetest' at line 1
//mysql> use test;
//Database changed
//mysql> show tables;
//+----------------+
//        | Tables_in_test |
//        +----------------+
//        | class          |
//        | exam           |
//        | stu            |
//        | stu1           |
//        +----------------+
//        4 rows in set (0.00 sec)
//
//mysql> use java113;
//Database changed
//mysql> show tables;
//+-------------------+
//        | Tables_in_java113 |
//        +-------------------+
//        | class             |
//        | course            |
//        | emp               |
//        | score             |
//        | stu2              |
//        | student           |
//        +-------------------+
//        6 rows in set (0.00 sec)
//
//mysql> select * from class;
//+----------+-------------------------+
//        | class_id | name                    |
//        +----------+-------------------------+
//        |        1 | 计算机系2019级1班       |
//        |        2 | 中文系2019级3班         |
//        |        3 | 自动化2019级5班         |
//        +----------+-------------------------+
//        3 rows in set (0.01 sec)
//
//mysql> select * from course;
//+-----------+--------------------+
//        | course_id | name               |
//        +-----------+--------------------+
//        |         1 | Java               |
//        |         2 | 中国传统文化       |
//        |         3 | 计算机原理         |
//        |         4 | 语文               |
//        |         5 | 高阶数学           |
//        |         6 | 英文               |
//        +-----------+--------------------+
//        6 rows in set (0.01 sec)
//
//mysql> use test;
//Database changed
//mysql> show tables;
//+----------------+
//        | Tables_in_test |
//        +----------------+
//        | class          |
//        | exam           |
//        | stu            |
//        | stu1           |
//        +----------------+
//        4 rows in set (0.00 sec)
//
//mysql> select * from class;
//+----+---------+
//        | id | name    |
//        +----+---------+
//        |  1 | java113 |
//        |  2 | java112 |
//        |  3 | java111 |
//        |  4 | java110 |
//        +----+---------+
//        4 rows in set (0.01 sec)
//
//mysql> select * from stu;
//+----+--------+----------+
//        | id | name   | class_id |
//        +----+--------+----------+
//        |  1 | 张三   |        1 |
//        |  2 | 李四   |        2 |
//        |  3 | 王五   |        3 |
//        +----+--------+----------+
//        3 rows in set (0.01 sec)
//
//mysql> select stu.id, stu.name, class.name from stu, class where stu.class_id = class.id;
//+----+--------+---------+
//        | id | name   | name    |
//        +----+--------+---------+
//        |  1 | 张三   | java113 |
//        |  2 | 李四   | java112 |
//        |  3 | 王五   | java111 |
//        +----+--------+---------+
//        3 rows in set (0.00 sec)
//
//mysql> select * from stu, class;
//+----+--------+----------+----+---------+
//        | id | name   | class_id | id | name    |
//        +----+--------+----------+----+---------+
//        |  3 | 王五   |        3 |  1 | java113 |
//        |  2 | 李四   |        2 |  1 | java113 |
//        |  1 | 张三   |        1 |  1 | java113 |
//        |  3 | 王五   |        3 |  2 | java112 |
//        |  2 | 李四   |        2 |  2 | java112 |
//        |  1 | 张三   |        1 |  2 | java112 |
//        |  3 | 王五   |        3 |  3 | java111 |
//        |  2 | 李四   |        2 |  3 | java111 |
//        |  1 | 张三   |        1 |  3 | java111 |
//        |  3 | 王五   |        3 |  4 | java110 |
//        |  2 | 李四   |        2 |  4 | java110 |
//        |  1 | 张三   |        1 |  4 | java110 |
//        +----+--------+----------+----+---------+
//        12 rows in set (0.00 sec)
//
//mysql> select * from stu, class where stu.class_id = class.id;
//+----+--------+----------+----+---------+
//        | id | name   | class_id | id | name    |
//        +----+--------+----------+----+---------+
//        |  1 | 张三   |        1 |  1 | java113 |
//        |  2 | 李四   |        2 |  2 | java112 |
//        |  3 | 王五   |        3 |  3 | java111 |
//        +----+--------+----------+----+---------+
//        3 rows in set (0.00 sec)
//
//mysql> select stu.id, stu.name, class.name from stu, class where stu.class_id = class.id;
//+----+--------+---------+
//        | id | name   | name    |
//        +----+--------+---------+
//        |  1 | 张三   | java113 |
//        |  2 | 李四   | java112 |
//        |  3 | 王五   | java111 |
//        +----+--------+---------+
//        3 rows in set (0.00 sec)
//
//mysql> select stu.id, stu.name, class.name from stu join class on stu.class_id = class.id;
//+----+--------+---------+
//        | id | name   | name    |
//        +----+--------+---------+
//        |  1 | 张三   | java113 |
//        |  2 | 李四   | java112 |
//        |  3 | 王五   | java111 |
//        +----+--------+---------+
//        3 rows in set (0.00 sec)
//
//mysql> show databases;
//+--------------------+
//        | Database           |
//        +--------------------+
//        | bit_mall           |
//        | homework           |
//        | information_schema |
//        | java113            |
//        | mysql              |
//        | performance_schema |
//        | sys                |
//        | test               |
//        | test2              |
//        +--------------------+
//        9 rows in set (0.00 sec)
//
//mysql> use test;
//Database changed
//mysql> show tables;
//+----------------+
//        | Tables_in_test |
//        +----------------+
//        | class          |
//        | exam           |
//        | stu            |
//        | stu1           |
//        +----------------+
//        4 rows in set (0.00 sec)
//
//mysql> select * from stu;
//+----+--------+----------+
//        | id | name   | class_id |
//        +----+--------+----------+
//        |  1 | 张三   |        1 |
//        |  2 | 李四   |        2 |
//        |  3 | 王五   |        3 |
//        +----+--------+----------+
//        3 rows in set (0.00 sec)
//
//mysql> select * from stu1;
//+----+--------+
//        | id | name   |
//        +----+--------+
//        |  1 | 张三   |
//        |  2 | 李四   |
//        |  3 | 王五   |
//        +----+--------+
//        3 rows in set (0.03 sec)
//
//mysql> use java113;
//Database changed
//mysql> show tables;
//+-------------------+
//        | Tables_in_java113 |
//        +-------------------+
//        | class             |
//        | course            |
//        | emp               |
//        | score             |
//        | stu2              |
//        | student           |
//        +-------------------+
//        6 rows in set (0.00 sec)
//
//mysql> select * from class;
//+----------+-------------------------+
//        | class_id | name                    |
//        +----------+-------------------------+
//        |        1 | 计算机系2019级1班       |
//        |        2 | 中文系2019级3班         |
//        |        3 | 自动化2019级5班         |
//        +----------+-------------------------+
//        3 rows in set (0.00 sec)
//
//mysql> select * from course;
//+-----------+--------------------+
//        | course_id | name               |
//        +-----------+--------------------+
//        |         1 | Java               |
//        |         2 | 中国传统文化       |
//        |         3 | 计算机原理         |
//        |         4 | 语文               |
//        |         5 | 高阶数学           |
//        |         6 | 英文               |
//        +-----------+--------------------+
//        6 rows in set (0.00 sec)
//
//mysql> select * from score;
//+----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+
//        |        1 |          1 |         1 | 70.50 |
//        |        2 |          1 |         3 | 98.50 |
//        |        3 |          1 |         5 | 33.00 |
//        |        4 |          1 |         6 | 98.00 |
//        |        5 |          2 |         1 | 60.00 |
//        |        6 |          2 |         5 | 59.50 |
//        |        7 |          3 |         1 | 33.00 |
//        |        8 |          3 |         3 | 68.00 |
//        |        9 |          3 |         5 | 99.00 |
//        |       10 |          4 |         1 | 67.00 |
//        |       11 |          4 |         3 | 23.00 |
//        |       12 |          4 |         5 | 56.00 |
//        |       13 |          4 |         6 | 72.00 |
//        |       14 |          5 |         1 | 81.00 |
//        |       15 |          5 |         5 | 37.00 |
//        |       16 |          6 |         2 | 56.00 |
//        |       17 |          6 |         4 | 43.00 |
//        |       18 |          6 |         6 | 79.00 |
//        |       19 |          7 |         2 | 80.00 |
//        |       20 |          7 |         6 | 92.00 |
//        |       21 |          1 |         1 | 70.50 |
//        |       22 |          1 |         3 | 98.50 |
//        |       23 |          2 |         1 | 60.00 |
//        +----------+------------+-----------+-------+
//        23 rows in set (0.01 sec)
//
//mysql> select * from student;
//+------------+-------+-----------------+------------------+----------+
//        | student_id | sn    | name            | mail             | class_id |
//        +------------+-------+-----------------+------------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223 | tellme          | NULL             |        2 |
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |
//        +------------+-------+-----------------+------------------+----------+
//        8 rows in set (0.01 sec)
//
//mysql> select score.course_id, score.score from student, score where student.student_id = score.student_id;
//+-----------+-------+
//        | course_id | score |
//        +-----------+-------+
//        |         1 | 70.50 |
//        |         3 | 98.50 |
//        |         5 | 33.00 |
//        |         6 | 98.00 |
//        |         1 | 70.50 |
//        |         3 | 98.50 |
//        |         1 | 60.00 |
//        |         5 | 59.50 |
//        |         1 | 60.00 |
//        |         1 | 33.00 |
//        |         3 | 68.00 |
//        |         5 | 99.00 |
//        |         1 | 67.00 |
//        |         3 | 23.00 |
//        |         5 | 56.00 |
//        |         6 | 72.00 |
//        |         1 | 81.00 |
//        |         5 | 37.00 |
//        |         2 | 56.00 |
//        |         4 | 43.00 |
//        |         6 | 79.00 |
//        |         2 | 80.00 |
//        |         6 | 92.00 |
//        +-----------+-------+
//        23 rows in set (0.01 sec)
//
//mysql> select score.course_id, score.score from student, score where student.name = '许仙' and student.student_id = scor
//e.student_id;
//+-----------+-------+
//        | course_id | score |
//        +-----------+-------+
//        |         1 | 67.00 |
//        |         3 | 23.00 |
//        |         5 | 56.00 |
//        |         6 | 72.00 |
//        +-----------+-------+
//        4 rows in set (0.00 sec)
//
//mysql> select student.student_id, sum(score.score) from student, scoer group by score.student_id;
//ERROR 1146 (42S02): Table 'java113.scoer' doesn't exist
//mysql> select student.student_id, sum(score.score) from student, score group by score.student_id;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.student.student_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select student.student_id, sum(score.score) from student, score where studemt.student_id = score.studet_id group by score.student_id;
//ERROR 1054 (42S22): Unknown column 'studemt.student_id' in 'where clause'
//mysql> select student.student_id, sum(score.score) from student, score where student.student_id = score.studet_id group
//by score.student_id;
//ERROR 1054 (42S22): Unknown column 'score.studet_id' in 'where clause'
//mysql> select student.student_id, sum(score.score) from student, score where student.student_id = score.student_id group
//by score.student_id;
//+------------+------------------+
//        | student_id | sum(score.score) |
//        +------------+------------------+
//        |          1 |           469.00 |
//        |          2 |           179.50 |
//        |          3 |           200.00 |
//        |          4 |           218.00 |
//        |          5 |           118.00 |
//        |          6 |           178.00 |
//        |          7 |           172.00 |
//        +------------+------------------+
//        7 rows in set (0.00 sec)
//
//mysql> select student.student_id, student.sn, student.name, student.mail, student.class_id, sum(score.score) as '总分' f
//        rom score, student where student.student_id = score.student_id group by score.student;
//ERROR 1054 (42S22): Unknown column 'score.student' in 'group statement'
//mysql> select student.student_id, student.sn, student.name, student.mail, student.class_id, sum(score.score) as '总分' f
//        rom score, student where student.student_id = score.student_id group by score.student_id;
//+------------+-------+-----------------+-----------------+----------+--------+
//        | student_id | sn    | name            | mail            | class_id | 总分   |
//        +------------+-------+-----------------+-----------------+----------+--------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 | 469.00 |
//        |          2 | 00835 | 菩提老祖        | NULL            |        1 | 179.50 |
//        |          3 | 00391 | 白素贞          | NULL            |        1 | 200.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 | 218.00 |
//        |          5 | 00054 | 不想毕业        | NULL            |        1 | 118.00 |
//        |          6 | 51234 | 好好说话        | say@qq.com      |        2 | 178.00 |
//        |          7 | 83223 | tellme          | NULL            |        2 | 172.00 |
//        +------------+-------+-----------------+-----------------+----------+--------+
//        7 rows in set (0.00 sec)
//
//mysql>